-- GENERATED SPELL FOR [Ethereum Wave-Caster] --


function spell0_20897(pUnit, Event) --@Arcane Haste,n/a--
pUnit:FullCastSpellOnTarget(32693,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_20897', 30288, 1)
end

function spell1_20897(pUnit, Event) --@Polymorph,n/a--
pUnit:FullCastSpellOnTarget(36840,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_20897', 7500, 1)
end

function spell2_20897(pUnit, Event) --@Polymorph,n/a--
pUnit:FullCastSpellOnTarget(38896,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_20897', 8272, 1)
end

function spell3_20897(pUnit, Event) --@Sonic Boom,n/a--
pUnit:FullCastSpellOnTarget(38897,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_20897', 4000, 1)
end

function Sorts_20897(pUnit, Event)
local choix_sorts_20897 = math.random(0, 3)
if choix_sorts_20897 == 0 then
pUnit:RegisterEvent('spell0_20897', 1, 1)
end
if choix_sorts_20897 == 1 then
pUnit:RegisterEvent('spell1_20897', 1, 1)
end
if choix_sorts_20897 == 2 then
pUnit:RegisterEvent('spell2_20897', 1, 1)
end
if choix_sorts_20897 == 3 then
pUnit:RegisterEvent('spell3_20897', 1, 1)
end
end

function mob20897_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_20897', math.random(1500, 3000), 1)
end

function mob20897_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob20897_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob20897_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(20897, 1, 'mob20897_Action')
RegisterUnitEvent(20897, 2, 'mob20897_Leave')
RegisterUnitEvent(20897, 3, 'mob20897_Kill')
RegisterUnitEvent(20897, 4, 'mob20897_Die')
